﻿//
// *************************************************************************************
// WP-Framework
//
// Developed by 
// Lukas Kretschmar (lkretschmar.dev@bluewin.ch)
//
// Switzerland, Copyright (c) 2013 lkretschmar
// This content is released under the MIT License (http://opensource.org/licenses/MIT).
//     
// *************************************************************************************
//
//


using System.Linq.Expressions;

namespace KretschIT.WP_Fx.EasyMoq.Matchers
{
    internal class ArgumentMatcher : BaseMatcher<ConstantExpression>
    {
        public ArgumentMatcher(ConstantExpression expression) 
            : base(expression)
        {
            
        }
        
        protected override bool CompareValue(object value)
        {
            if (this.MatcherExpression.Value != null)
            {
                return this.MatcherExpression.Value.Equals(value);
            }
            return value == null;
        }
    }
}
